﻿using System;
using System.Data;
using System.Collections;
using CE.Database;

/// <summary>
/// Summary description for CarUserOptionDB
/// </summary>
/// 
namespace CE.CarInsurance
{
    public class CarUserOptionDB
    {
        public CarUserOptionDB()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public Int64 Insert(CarUserOption caruseroption)
        {
            MyDatabase _db = new MyDatabase();
            Int64 _result = -1;
            string _spName = "[sprocCarUserOptionInsertUpdateSingleItem]";

            SortedList _sPara = new SortedList();

            #region Parameter
            _sPara.Add("@CarUserOptionId", caruseroption.CarUserOptionId);
            _sPara.Add("@CECarId", caruseroption.CECarId);
            _sPara.Add("@IsBuyNow", caruseroption.IsBuyNow);
            _sPara.Add("@IsCallMe", caruseroption.IsCallMe);
            _sPara.Add("@IsEmailMe", caruseroption.IsEmailMe);
            _sPara.Add("@IsEmailThis", caruseroption.IsEmailThis);
            _sPara.Add("@RecipientEmailAddress", caruseroption.RecipientEmailAddress);
            _sPara.Add("@RecipientName", caruseroption.RecipientName);
            _sPara.Add("@ViewedDetailId", caruseroption.ViewedDetailId);
            _sPara.Add("@RefCEUserId", caruseroption.RefCEUserId);
          
            #endregion

            _result = _db.ExecuteSP(_spName, _sPara);

            return _result;
        }

    }
}
